package historyElemente;

import java.awt.Graphics;

public class HistoryString implements HistoryElement{

	private String string;
	
	public HistoryString(String s){
		this.string = s;
	}
	
	@Override
	public void drawElement(Graphics g, int x, int y) {
		g.drawString(string, x , y);
	}

	@Override
	public int getWidth(Graphics g) {
		return g.getFontMetrics().stringWidth(string);
	}
	
	public char[] getChars(){
		return string.toCharArray();
	}
	
	@Override
	public String toString(){
		return string;
	}

}
